package com.puzzlebazar.client.main.control;

import java.util.HashMap;


public abstract class HistoryStateImpl implements HistoryState {

	/**
	 * Initializes a new history state and register it with a controller
	 * 
	 * @param controller The associated history controller
	 */
	protected HistoryStateImpl( HistoryController controller ) {
		String token = getStateToken();
		if( token != null )
			controller.addHistoryToken( token, this );
	}
	
	@Override
	public String getStateToken() {
		return null;
	}

	@Override
	public HashMap<String,String > getParams() {
		return null;
	}

	@Override
	public void setParams(HashMap<String, String> params) throws Exception {
	}
	
	@Override
	public boolean canEnter() {
		return true;
	}

	@Override
	public void release() {
	}
}
